<template>
  <p>出错啦～～～</p>
  <p>{{ error.statusCode }}</p>
  <p>{{ error.message }}</p>
  <button @click="clearErrorHandler">清除错误</button>
</template>

<script setup>
const props = defineProps({
  error: Object,
});
console.log(props.error);

const clearErrorHandler = () => {
  clearError();
};
</script>
